package com.isnmp.nms.framework.discover.service;

import java.util.Iterator;
import java.util.List;

import com.isnmp.nms.framework.discover.DeviceInfo;
import com.isnmp.nms.framework.discover.ResourceInfo;
import com.isnmp.nms.framework.discover.ResourceSearchMothType;

class ResourceSearchTask implements Runnable {
    DeviceInfo deviceInfo;
    List<ResourceInfo> rsList;
    ResourceSearchMothType resourceType;

    public ResourceSearchTask(DeviceInfo paramDeviceInfo, ResourceSearchMothType paramResourceSearchMothType, List<ResourceInfo> paramList) {
        this.deviceInfo = paramDeviceInfo;
        this.resourceType = paramResourceSearchMothType;
        this.rsList = paramList;
    }

    public void run() {
        List localList = this.resourceType.getResoureInfo(this.deviceInfo);
        Iterator localIterator = localList.iterator();
        while (localIterator.hasNext()) {
            ResourceInfo localResourceInfo = (ResourceInfo) localIterator.next();
            if (localResourceInfo != null){
                this.rsList.add(localResourceInfo);
            }
        }
    }
}